<template>
  <div class="shop">
    <div
      @click="shangpin(value, index)"
      class="shop-car"
      v-for="(value, index) in arrNew"
      :key="index"
    >
      <img :src="srcc + value.image_path" alt="" />
      <div class="right">
        <p class="pinpai">品牌</p>
        <p>{{ value.category }}</p>
        <p>距离您{{ value.distance }}</p>
        <xingxing :width="value.rating"></xingxing>
      </div>
    </div>
  </div>
</template>
<style scoped>
* {
  margin: 0;
  padding: 0;
}
.shop {
  width: 100%;
  overflow: hidden;
}
.shop-car {
  width: 100%;
  height: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.4rem;
  box-sizing: border-box;
  padding-left: 0.4rem;
  padding-right: 0.4rem;
}
.shop-car img {
  width: 1.6rem;
  height: 1.6rem;
}
.sj {
  font-size: 0.3rem;
  height: 1.4rem;
  line-height: 1.4rem;
  padding-left: 0.3rem;
}
.pinpai {
  width: 0.8rem;
  line-height: 00.34rem;
  height: 0.34rem;
  font-size: 0.16rem;
  text-align: center;
  color: #000;
  background-color: #ffd930;
}
.right {
  width: 70%;
  overflow: hidden;
}
</style>
<script>
import xingxing from "../../page/xingxing.vue";
export default {
  components: {
    xingxing,
  },
  props: ["arrNew", "srcc"],
  data() {
    return {};
  },
  methods: {
    shangpin(value, index) {
      this.$router.push({
        path: "/elm-shoppin",
        query: { shuzu: value.id, jige: index },
      });
    },
  },
};
</script>
